#!/usr/bin/env bash
time_stamp=$(date +%Y_%m_%d_%H_%M_%S)
mkdir ~/.halo/backups/${time_stamp}
cp -rf build/libs/halo-1.1.1.jar ~/.halo/backups/${time_stamp}

git pull
sh gradlew build
sh ~/.halo/stop.sh
rm -rf ~/.halo/halo-latest.jar
cp build/libs/halo-1.1.1.jar ~/.halo/halo-latest.jar
cd ~/.halo
sh ~/.halo/start.sh

